<script type="text/javascript" src="<?php echo base_url()?>/assets/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
    selector: "textarea#isi",
    theme: "modern",
    height: 500,
    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
         "save table contextmenu directionality emoticons template paste textcolor"
   ],
   content_css: "css/content.css",
   toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons", 
   style_formats: [
        {title: 'Bold text', inline: 'b'},
        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
        {title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
        {title: 'Table styles'},
        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
    ],
    pagebreak_separator: "<!-- page break -->"
 }); 
</script>

<section id="main-content">
          <section class="wrapper site-min-height">
          	<h3><i class="fa fa-angle-right"></i> <?php if (isset($title)){echo $title;} ?></h3>
          	
          	<!-- BASIC FORM ELELEMNTS -->
          	<div class="row mt">
          		<div class="col-lg-12">
                  <div class="form-panel">
                  	  <h4 class="mb"><i class="fa fa-thumb-tack fa-angle-right"></i> Add Post</h4>
                  	  <form class="form-horizontal style-form" method="post">
                  	  <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">Title</label>
                            <div class="col-sm-10">
                      	        <input type="text"  class="form-control" placeholder="Type your post title here.." required>
                            </div>
                      </div>
                      <div class="form-group">
							  <label class="col-sm-2 col-sm-2 control-label" for="post-photo">Featured image</label>
							  <div class="col-sm-10">
								<input type="file" data-filename-placement="inside" id="post-photo" required name="post_photo" />
							  </div>
						</div>
						
						<div class="form-group">
							  <label class="col-sm-2 col-sm-2 control-label">Post</label>
							  <div class="col-sm-10">
								<textarea id="isi" name="area" ></textarea>
							  </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 col-sm-2 control-label">Kategori</label>
							<div class="col-sm-10">
							  <select multiple="multiple">
							  	<?php foreach($arrKategori as $kategori): ?>
								  	<option value="<?php echo $kategori["id_kategori"]; ?>"><?php echo $kategori["nama_kategori"]; ?></option>
						   		<?php endforeach; ?>
							  </select>
							</div>
						</div>
						<div class="form-group">
							<div style="text-align:center">
							  <button type="submit" class="btn btn-primary">Save changes</button>
							  <button type="reset" class="btn">Cancel</button>
							</div>
						</div>
					</div>
				</section><! --/wrapper -->
      </section><!-- /MAIN CONTENT -->